import request from '@/api/request'

//限时活动列表
function findAllRecommends(data) {
  return request({
    url: '/lejuAdmin/homeRecommend/findAllRecommends',
    data
  })
}

//删除限时活动
function delRecommend(recommendId,data) {
  return request({
    url: `/lejuAdmin/homeRecommend/delRecommend/${recommendId}`,
    method:"DELETE",
    data
  })
}
//查询商品列表
function productsByPage(start,limit,data) {
  return request({
    url: `/lejuAdmin/product/productsByPage/${start}/${limit}`,
    method:"POST",
    data
  })
}

//品牌列表数据
function findAllBrand(data) {
  return request({
    url: `/lejuAdmin/brand/findAllBrand`,
    data
  })
}

//添加限时活动
function addRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/addRecommend`,
    method:"POST",
    data
  })
}

//修改限时活动
function updateRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/updateRecommend`,
    method:"POST",
    data
  })
}



export{
  findAllRecommends,delRecommend,productsByPage,findAllBrand,addRecommend,updateRecommend
}